3.637 \(\int \frac{\cos ^5(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx\)

Optimal. Leaf size=73 \[ -\frac{\cos ^3(c+d x)}{3 a^2 d}+\frac{\cos (c+d x)}{a^2 d}-\frac{\sin (c+d x) \cos (c+d x)}{a^2 d}-\frac{\tanh ^{-1}(\cos (c+d x))}{a^2 d}-\frac{x}{a^2} \]

[Out]

-(x/a^2) - ArcTanh[Cos[c + d*x]]/(a^2*d) + Cos[c + d*x]/(a^2*d) - Cos[c + d*x]^3/(3*a^2*d) - (Cos[c + d*x]*Sin
[c + d*x])/(a^2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.201429, antiderivative size = 73, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 9, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {2875, 2873, 2635, 8, 2592, 321, 206, 2565, 30} \[ -\frac{\cos ^3(c+d x)}{3 a^2 d}+\frac{\cos (c+d x)}{a^2 d}-\frac{\sin (c+d x) \cos (c+d x)}{a^2 d}-\frac{\tanh ^{-1}(\cos (c+d x))}{a^2 d}-\frac{x}{a^2} \]

Antiderivative was successfully verified.

[In]

Int[(Cos[c + d*x]^5*Cot[c + d*x])/(a + a*Sin[c + d*x])^2,x]

[Out]

-(x/a^2) - ArcTanh[Cos[c + d*x]]/(a^2*d) + Cos[c + d*x]/(a^2*d) - Cos[c + d*x]^3/(3*a^2*d) - (Cos[c + d*x]*Sin
[c + d*x])/(a^2*d)

Rule 2875

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Dist[(a/g)^(2*m), Int[((g*Cos[e + f*x])^(2*m + p)*(d*Sin[e + f*x])^n)/(a - b*Sin[e +
 f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && ILtQ[m, 0]

Rule 2873

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x]
 /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]

Rule 2635

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Sin[c + d*x])^(n - 1))/(d*n),
x] + Dist[(b^2*(n - 1))/n, Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integer
Q[2*n]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2592

Int[((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> With[{ff = FreeFactors[S
in[e + f*x], x]}, Dist[ff/f, Subst[Int[(ff*x)^(m + n)/(a^2 - ff^2*x^2)^((n + 1)/2), x], x, (a*Sin[e + f*x])/ff
], x]] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n + 1)/2]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 2565

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int \frac{\cos ^5(c+d x) \cot (c+d x)}{(a+a \sin (c+d x))^2} \, dx &=\frac{\int \cos (c+d x) \cot (c+d x) (a-a \sin (c+d x))^2 \, dx}{a^4}\\ &=\frac{\int \left (-2 a^2 \cos ^2(c+d x)+a^2 \cos (c+d x) \cot (c+d x)+a^2 \cos ^2(c+d x) \sin (c+d x)\right ) \, dx}{a^4}\\ &=\frac{\int \cos (c+d x) \cot (c+d x) \, dx}{a^2}+\frac{\int \cos ^2(c+d x) \sin (c+d x) \, dx}{a^2}-\frac{2 \int \cos ^2(c+d x) \, dx}{a^2}\\ &=-\frac{\cos (c+d x) \sin (c+d x)}{a^2 d}-\frac{\int 1 \, dx}{a^2}-\frac{\operatorname{Subst}\left (\int x^2 \, dx,x,\cos (c+d x)\right )}{a^2 d}-\frac{\operatorname{Subst}\left (\int \frac{x^2}{1-x^2} \, dx,x,\cos (c+d x)\right )}{a^2 d}\\ &=-\frac{x}{a^2}+\frac{\cos (c+d x)}{a^2 d}-\frac{\cos ^3(c+d x)}{3 a^2 d}-\frac{\cos (c+d x) \sin (c+d x)}{a^2 d}-\frac{\operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\cos (c+d x)\right )}{a^2 d}\\ &=-\frac{x}{a^2}-\frac{\tanh ^{-1}(\cos (c+d x))}{a^2 d}+\frac{\cos (c+d x)}{a^2 d}-\frac{\cos ^3(c+d x)}{3 a^2 d}-\frac{\cos (c+d x) \sin (c+d x)}{a^2 d}\\ \end{align*}

Mathematica [A]  time = 0.319738, size = 69, normalized size = 0.95 \[ -\frac{-9 \cos (c+d x)+\cos (3 (c+d x))+6 \left (\sin (2 (c+d x))+2 \left (-\log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )+\log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )+c+d x\right )\right )}{12 a^2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[(Cos[c + d*x]^5*Cot[c + d*x])/(a + a*Sin[c + d*x])^2,x]

[Out]

-(-9*Cos[c + d*x] + Cos[3*(c + d*x)] + 6*(2*(c + d*x + Log[Cos[(c + d*x)/2]] - Log[Sin[(c + d*x)/2]]) + Sin[2*
(c + d*x)]))/(12*a^2*d)

________________________________________________________________________________________

Maple [B]  time = 0.118, size = 160, normalized size = 2.2 \begin{align*} 2\,{\frac{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) ^{5}}{d{a}^{2} \left ( 1+ \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) ^{2} \right ) ^{3}}}+4\,{\frac{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) ^{2}}{d{a}^{2} \left ( 1+ \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) ^{2} \right ) ^{3}}}-2\,{\frac{\tan \left ( 1/2\,dx+c/2 \right ) }{d{a}^{2} \left ( 1+ \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) ^{2} \right ) ^{3}}}+{\frac{4}{3\,d{a}^{2}} \left ( 1+ \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) ^{2} \right ) ^{-3}}-2\,{\frac{\arctan \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) }{d{a}^{2}}}+{\frac{1}{d{a}^{2}}\ln \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^6*csc(d*x+c)/(a+a*sin(d*x+c))^2,x)

[Out]

2/d/a^2/(1+tan(1/2*d*x+1/2*c)^2)^3*tan(1/2*d*x+1/2*c)^5+4/d/a^2/(1+tan(1/2*d*x+1/2*c)^2)^3*tan(1/2*d*x+1/2*c)^
2-2/d/a^2/(1+tan(1/2*d*x+1/2*c)^2)^3*tan(1/2*d*x+1/2*c)+4/3/d/a^2/(1+tan(1/2*d*x+1/2*c)^2)^3-2/d/a^2*arctan(ta
n(1/2*d*x+1/2*c))+1/d/a^2*ln(tan(1/2*d*x+1/2*c))

________________________________________________________________________________________

Maxima [B]  time = 1.56294, size = 254, normalized size = 3.48 \begin{align*} -\frac{\frac{2 \,{\left (\frac{3 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac{6 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac{3 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - 2\right )}}{a^{2} + \frac{3 \, a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac{3 \, a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac{a^{2} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}} + \frac{6 \, \arctan \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}} - \frac{3 \, \log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

-1/3*(2*(3*sin(d*x + c)/(cos(d*x + c) + 1) - 6*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 3*sin(d*x + c)^5/(cos(d*x
 + c) + 1)^5 - 2)/(a^2 + 3*a^2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 3*a^2*sin(d*x + c)^4/(cos(d*x + c) + 1)^4
 + a^2*sin(d*x + c)^6/(cos(d*x + c) + 1)^6) + 6*arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a^2 - 3*log(sin(d*x +
c)/(cos(d*x + c) + 1))/a^2)/d

________________________________________________________________________________________

Fricas [A]  time = 1.20221, size = 207, normalized size = 2.84 \begin{align*} -\frac{2 \, \cos \left (d x + c\right )^{3} + 6 \, d x + 6 \, \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 6 \, \cos \left (d x + c\right ) + 3 \, \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) - 3 \, \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right )}{6 \, a^{2} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

-1/6*(2*cos(d*x + c)^3 + 6*d*x + 6*cos(d*x + c)*sin(d*x + c) - 6*cos(d*x + c) + 3*log(1/2*cos(d*x + c) + 1/2)
- 3*log(-1/2*cos(d*x + c) + 1/2))/(a^2*d)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**6*csc(d*x+c)/(a+a*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.43382, size = 123, normalized size = 1.68 \begin{align*} -\frac{\frac{3 \,{\left (d x + c\right )}}{a^{2}} - \frac{3 \, \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right )}{a^{2}} - \frac{2 \,{\left (3 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} + 6 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 3 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 2\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 1\right )}^{3} a^{2}}}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)/(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

-1/3*(3*(d*x + c)/a^2 - 3*log(abs(tan(1/2*d*x + 1/2*c)))/a^2 - 2*(3*tan(1/2*d*x + 1/2*c)^5 + 6*tan(1/2*d*x + 1
/2*c)^2 - 3*tan(1/2*d*x + 1/2*c) + 2)/((tan(1/2*d*x + 1/2*c)^2 + 1)^3*a^2))/d